/*
 *  Copyright 2009 Lucas Nazário dos Santos
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package net.sourceforge.retriever.feedback;

/**
 * <p>
 * Interface that allows the crawler to provide feedback about what is going on during the
 * crawling process.
 * </p>
 * 
 * <p>
 * For users to consume these feedbacks, an appropriate implementation of this interface
 * must be written and passed to the crawler.
 * </p>
 * 
 * @see net.sourceforge.retriever.Retriever#Crawler(CrawlerFeedback)
 */
public interface Feedback {


	/**
	 * Used for error messages.
	 * 
	 * @param url States that the error message is associated with a URL.
	 * @param message The message.
	 * @param caught The exception.
	 */
	void error(String url, String message, Throwable caught);

	/**
	 * Used for warning messages.
	 * 
	 * @param url States that the warning message is associated with a URL.
	 * @param message The message.
	 */
	void warning(String url, String message);

	/**
	 * Used for informative messages.
	 * 
	 * @param url States that the info message is associated with a URL.
	 * @param message The message.
	 */
	void info(String url, String message);
}